<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>字典循环学习</title>
</head>
<body>
	<div>
		<h2>只遍历字典的key</h2>
	{#		遍历字典的key值注意关键词keys#}
			{%  for k in user_dict.keys %}
				<li>{{ k }}</li>
			{% endfor %}
		<br />
		<h2>只遍历字典的值</h2>
	{#		遍历字典的value注意关键词values#}
			{%  for v in user_dict.values %}
				<li>{{ v }}</li>
			{% endfor %}
			<br />
		<h2>遍历字典的key和value</h2>
	{#		遍历字典的key和value，注意关键词items#}
			{%  for k,v in user_dict.items %}
				<li>{{ k }} -- {{ v }}</li>
			{% endfor %}

	</div>
</body>
</html>